﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MHYS.DEMO.Model;
using System.Data;
namespace MHYS.DEMO.DAL
{
    public class RankInfoService
    {


        /// <summary>
        /// 返回所有权限对象
        /// </summary>
        /// <returns>权限对象集</returns>
        public static List<RankInfo> SelectAllRole()
        {
            string sql = string.Format("SELECT * FROM RankInfo");
            DataTable dataTable = DBHelper.SelectDatatable(sql);
            List<RankInfo> result = new List<RankInfo>();
            foreach (DataRow item in dataTable.Rows)
            {
                RankInfo rank = new RankInfo()
                {
                    Rid = Convert.ToInt32(item["Rid"].ToString()),
                    RName = item["RName"].ToString()
                };
                result.Add(rank);
            };
            return result;
        }


    }
}

